using System.Diagnostics;

namespace UnityX
{
    public class ScreenCaptureRecorderUtils
    {
        public static void RegisterDll(string dllPath)
        {
            ProcessStartInfo processStartInfo = new ProcessStartInfo { FileName = "regsvr32.exe", Arguments = "/s " + dllPath };
            using (Process process = new Process())
            {
                process.StartInfo = processStartInfo;
                process.Start();
                process.WaitForExit();
            }
        }
        public static void UregisterDll(string dllPath)
        {
            ProcessStartInfo processStartInfo = new ProcessStartInfo { FileName = "regsvr32.exe", Arguments = "/u " + dllPath };
            using (Process process = new Process())
            {
                process.StartInfo = processStartInfo;
                process.Start();
                process.WaitForExit();
            }
        }
    }
}